﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MDX_Studio_v2
{

	public class ExecutionContext
	{
		private QueryEditor ActiveEditor = null;

		public ExecutionContext(QueryEditor editor)
		{
			ActiveEditor = editor;
		}
	}

	public class Context
	{
		private SSASConnection _conn;
		private bool _debugMode = false;
		//private bool _debugMode = false;
		private PerfmonStats _PerfStats;
		private MainForm _MainForm;
		private Microsoft.AnalysisServices.AdomdClient.CellSet _results;
		//private List<string> _messages;

		private string _queryText;

		public Context()
		{
			_conn = null;
			_PerfStats = new PerfmonStats();
			//_messages = new List<string>();
		}

		public string QueryText
		{
			set
			{
				_queryText = value;
			}
		}

		/// <summary>
		/// Gets or sets the SSAS Connection
		/// </summary>
		public SSASConnection Connection
		{
			get { return _conn; }
			set { _conn = value; }
		}

		/// <summary>
		/// Gets or sets the PerfStats object
		/// </summary>
		public PerfmonStats PerfStats
		{
			get { return _PerfStats; }
			set { _PerfStats = value; }
		}

		public MainForm MainForm
		{
			get { return _MainForm; }
			set { _MainForm = value; }
		}

		public Microsoft.AnalysisServices.AdomdClient.CellSet Results
		{
			get { return _results; }
			set { _results = value; }
		}

		//public void AddMessage(string mess) { _messages.Add(

		/// <summary>
		/// True -> Program is in Debug Mode
		/// </summary>
		public bool DebugMode
		{
			get { return _debugMode; }
			set { }
		}
	}
}
